# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=vulkan-loader
_pkgname=Vulkan-Loader
pkgver=1.2.137
pkgrel=0
arch="all"
url="https://www.khronos.org/vulkan"
pkgdesc="Vulkan Installable Client Driver (ICD) Loader"
license="Apache-2.0"
depends_dev="vulkan-headers<1.2.140"
makedepends="$depends_dev cmake python3 libx11-dev wayland-dev libxrandr-dev"
source="vulkan-loader-$pkgver.tar.gz::https://github.com/khronosgroup/vulkan-loader/archive/v$pkgver.tar.gz"
subpackages="$pkgname-dev"
options="!check" # No tests
builddir="$srcdir/$_pkgname-$pkgver"

build() {
	cmake -B build \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DCMAKE_INSTALL_SYSCONFDIR=/etc \
		-DCMAKE_INSTALL_DATADIR=share \
		-DCMAKE_SKIP_RPATH=True \
		-DVULKAN_HEADERS_INSTALL_DIR=/usr
	make -C build
}

package() {
	DESTDIR="$pkgdir" make -C build install
}

sha512sums="8ada45a79fed7c99bb7b35d8d2f15a69086aca30a1175469a6a2be31a418828abd16d1695ce36c0df305a6d0395e65008115a82aede8b31313edd745314b4796  vulkan-loader-1.2.137.tar.gz"
